package com.angcyo.selenium.auto

import com.angcyo.selenium.auto.parse.HandleResult
import com.angcyo.selenium.bean.ActionBean
import com.angcyo.selenium.bean.TaskBean

/**
 * Email:angcyo@126.com
 * @author angcyo
 * @date 2021/01/26
 */
open class ActionListener {

    /**[ActionBean]开始运行前回调
     * [isPrimaryAction] 是否是主线的[ActionBean]*/
    open fun onActionRunBefore(actionBean: ActionBean, isPrimaryAction: Boolean) {

    }

    /**[ActionBean]运行后回调
     * [handleResult] 处理结果*/
    open fun onActionRunAfter(actionBean: ActionBean, isPrimaryAction: Boolean, handleResult: HandleResult?) {

    }


    /**控制器开始回调*/
    open fun onControlStart(taskBean: TaskBean) {

    }

    /**控制器结束回调*/
    open fun onControlEnd(taskBean: TaskBean, state: Int, reason: String) {

    }
}